{% extends 'admin/layout.html.twig' %}

{% set menu = 'admin_cloud_video_overview' %}
{% set script_controller = 'setting/cloud-video-overview.js' %}

{% set script_arguments = {spaceItems: spaceItems, flowItems: flowItems}  %}
{#{% block tabs %}{% include 'admin/role/templates/tabs.html.twig' %}{% endblock %}#}

{% block page_title %}
  {% if setting('cloud_status.locked') == true %}
    <div class="alert alert-warning" role="alert">{{'admin.edu_cloud.edu_video.locked_tips'|trans}}</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% elseif video.status|default() == 'stoped' %}
    <div class="alert alert-warning" role="alert">{{'admin.edu_cloud.edu_video.stoped_tips'|trans}}</div>
    {{ currentMenu.code|parent_permission.name|trans }}
  {% else %}
    {{ parent() }}
  {% endif %}
{% endblock %}

{% block main %}
{% if video.isBuy == true %}
  {% include 'admin/edu-cloud/video/video-show.html.twig' %}
{% else %}
  {% include 'admin/edu-cloud/video/video-buy.html.twig' %}
{% endif %}

{% if yearPackage.isBuy == true %}
  {% include 'admin/edu-cloud/video/flow-show.html.twig' %}
{% else %}
  {% include 'admin/edu-cloud/video/flow-buy.html.twig' %}
{% endif %}

<div class="panel panel-default panel-chart">
    <div class="panel-heading">{{'admin.edu_cloud.edu_video.storage_space_trend'|trans|raw}}</span><a class="pull-right" href="{{path('admin_cloud_video_detail')}}" target="_blank">{{'admin.edu_cloud.edu_video.more'|trans}}&ensp;></a></div>
    <div class="panel-body">
      <div id="spaceItemChart" style="width: 100%;height:400px;"></div>
    </div>
</div>

<div class="panel panel-default panel-chart">
  <div class="panel-heading">
    {{'admin.edu_cloud.edu_video.flow_use_trend'|trans|raw}}</span>
    <a class="pull-right" href="{{path('admin_cloud_video_detail')}}" target="_blank">{{'admin.edu_cloud.edu_video.more'|trans}}&ensp;></a>
  </div>
  <div class="panel-body">
    <div id="flowItemChart" style="width: 100%;height:400px;"></div>
  </div>
</div>

{% endblock %}